﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Lib.Controls;
using System.Data;
using Lib.Utilities;

public partial class App_form_Daotao_xet_duyet : fpage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                ScriptManager.GetCurrent(this).Services.Add(new ServiceReference("~/Service/wht_nsd.svc"));
                ScriptManager.GetCurrent(this).Services.Add(new ServiceReference("~/Service/wdt_ma.svc"));

                //NAM
                namhoc.DataSource = dm_dt.FDM_NAM_LKE();
                namhoc.DataBind();

                //LOAI DTdm_dt.FDT_LOP_PC_DAY_LKE(LibConvert.ObjectToDouble(nam_id));
                lop.DataSource = dm_dt.FDT_PC_DAY_LOP_LKE(LibConvert.ObjectToDouble(namhoc.SelectedValue), hocky.SelectedValue);
                lop.DataBind();
                //LOAI DT
                DataTable b_dt = dm_dt.FDT_HE_DT_LKE();
                loaidt.DataSource = b_dt;
                loaidt.DataBind();

                DataTable b_dt1 = new DataTable();
                LibTable.AddNewColumns(ref b_dt1, new string[] { "MA", "TEN" });
                LibTable.AddNewRows(ref b_dt1, new object[] { "HKI", "Học kỳ I" });
                LibTable.AddNewRows(ref b_dt1, new object[] { "HKII", "Học kỳ II" });
                hocky.DataSource = b_dt1;
                hocky.DataBind();
            }
            catch (Exception ex)
            {
                Lib.Utilities.LibForm.Msg(this.Page, ex.Message);
            }
        }
    }
}